/**
 * desc: combine grid and form
 * author: Joe
 * date: 8/6/2018
 */

coreModule.component('nGridPanel', {
  templateUrl: 'components/grid-panel/grid-panel.template.html',
  bindings: {
    gmScope: '<',
    gmOption: '<',
  },
  controller:
    [
      '$log',
      function($log) {
        this.$onInit = function() {
          this.scope = this.gmScope || this;
          this.option = this.gmOption || {};

          if (angular.isUndefined(this.option.gridManagerName) || !angular.isArray(this.option.columnData)) {
            $log.log('everything in [gridManagerName, columnData] list is necessary!');
          }
        };
      },
    ],
});
